The most famous comet is probably Halley's comet, which has a rather eccentric elliptical orbit:
In[16]:=
Out[16]=
0.96714291
Comets have a variety of orbits, with eccentricities that vary from nearly circular to hyperbolic. You can use distinct colors for the various orbit types:
In[17]:=
planetorbits=EntityValue["Planet","OrbitPath"];
In[18]:=
cometorbits=EntityValue,,,"OrbitPath";
In[19]:=
Graphics3DMapIndexed[{ColorData[22,1+First[#2]],#1}&,Prepend[cometorbits,planetorbits]],
Out[19]=
In December of 2018, comet 46P/Wirtanen made a close pass of Earth. You can visualize the positions of the Earth and the comet as follows:
In[20]:=
dates=DateRange,,;
In[21]:=
comet=;positions=Dated["HelioCoordinates",#]&/@dates;
In[23]:=
magnitudeAU[data_]:=QuantityMagnitude[data,"AstronomicalUnit"]
In[24]:=
cometcoords=magnitudeAU[EntityValue[comet,positions]];earthcoords=magnitudeAUEntityValue,positions;
You can view the scene from a couple of different vantage points to observe the different orbital inclinations involved:
Out[26]=